package org.springframework.sandbox.mvc;

import com.google.gson.Gson;
import jskj.rmi.IRmiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

@Controller
@RequestMapping("/hello")
public class TestController {
    @Autowired
    private IRmiService iRmiService;

    @RequestMapping(value="/foo", produces = "text/html; charset=utf-8")
    public @ResponseBody String getShopInJSON(HttpServletRequest request) {


        String s = iRmiService.sendMessage();
        System.out.println(s);

        return iRmiService.sendMessage("778899");
    }

}
